package com.example.controller;

import com.example.util.StringUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
// import com.alibaba.fastjson.parser.ParserConfig;

@RestController
@RequestMapping(value = "/string")
public class StringController {
    /**
     * 不支持正则表达式
     *
     * @param str
     * @param regex
     * @param replacement
     * @return
     */
    @GetMapping(value = "/replaceAll")
    public String replaceAll(String str, String regex, String replacement) {
        return StringUtil.replaceAll(str, regex, replacement);
    }


}